> In article <4epplj$egf@host-3.cyberhighway.net>,
> <mjellis@cyberhighway.net> wrote:
> >Hey...ease up buddy. I'm one of those idiots that made such a post 'void main()' and a nice gentlemen sent me an email informing me of the ANSI standard regarding this.
> >
> >Because of this nice gentlemen's information, now I know better. And, he didn't scare me off this newsgroup be blowing my head off with a cannon! Email works wonders and it's *so* much more courteous.
>
> There is nothing with 'void main()'. It's not giverned by the ANSI standard,
> first of all, because that is not an ANSI definition. An ANSI definiton would
> be more like 'void main(void)'.
>
> You don't need main() to be defined has having any sort of return value unless
> you plan to "return" out of it. If you use exit(0) like me, declaring the
> function void is ok, since your function never returns.
>
> The antsy standard is _great_ for assuring me that my bike helmet is safe, mind
> you.
Please be careful when posting jokes -- some people might take them
seriously. There actually are people who have so little knowledge of
the C language that they think void main(void) is a legal C. Of
course, as anyone who has actually read the standard is aware (or, at
least, anyone except Shildt), defining main as returning void results
in undefined behavior. The standard allows the program to do anything
(format you disk, send nasty email to our boss, start world war III,
..).
By the way, "void main()" is just as much an ANSI definition (or,